<?php

class Form extends Html_Element_Group
{
	protected $_meta = array(
		'tag' => 'form',
		'render' => 'div3'
	);

	protected $_attrib = array(
		'method' => 'post',
		'enctype' => 'multipart/form-data',
		'action' => '',
	);

	/**
	 * recheck is valid by call back process
	 */
	public function isValid($values)
	{
		if (parent::isValid($values))
		{
			return $this -> afterValidate();
		}

		return 0;
	}

	public function afterValidate()
	{
		return 1;
	}

	static public function factory($name)
	{
		$cls = Agilet::getCanonicalClass($name);
		return new $cls;
	}

}
